using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using System.ComponentModel.DataAnnotations.Schema;
using SalesPages.DomainModel;

namespace SalesPages.EntityFrameworkRepository.Mapping
{
    public class SetCookieNumberMap : EntityTypeConfiguration<SetCookieNumber>
    {
        public SetCookieNumberMap()
        {
            // Primary Key
            this.HasKey(t => t.SetCookieNumber1);

            // Properties
            this.Property(t => t.SetCookieNumber1)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            // Table & Column Mappings
            this.ToTable("SetCookieNumber");
            this.Property(t => t.SetCookieNumber1).HasColumnName("SetCookieNumber");
            this.Property(t => t.LastUpdatetime).HasColumnName("LastUpdatetime");
        }
    }
}
